//抄送列表
import java.util.*;
public class Main2{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextLine()){
            String names = scan.nextLine();
            names +=",";
            HashSet<String> set = new HashSet<>();//用set放元素
             String tmp="";//清空字符串
            boolean flag =true;
            for(int i=0;i< names.length();i++){
                if(flag){
                    if(names.charAt(i) =='"'){
                        flag = false;
                        continue;
                    }
                     if(names.charAt(i) == ','){//走完一个
                         set.add(tmp);
                         tmp ="";
                         continue;
                     }
                         
                   tmp += names.charAt(i);
                }else{
                    if(names.charAt(i)=='"'){//遍历完另一个字符串
                        set.add(tmp);
                        tmp = "";
                        flag = true;
                        continue;
                    }
                    tmp+= names.charAt(i);
                    
                }
               
            }
            String name = scan.nextLine();
            if(set.contains(name)){//比较set的元素和tmp的,看set里面是否包含要找的name
                System.out.println("Ignore");
          }else{
               System.out.println("Important!");
           }
          
            
        }
        
    }
}